/**
 * Created by Adam on 2017/5/16.
 */
import React from 'react'
import PropTypes from 'prop-types'

const User = ({onClick, id, name, age, gender}) => (
    <tr onClick={onClick}>
        <td>{id}</td>
        <td>{name}</td>
        <td>{age}</td>
        <td>{gender}</td>
    </tr>
)

User.propType = {
    id: PropTypes.number.isRequired,
    name: PropTypes.string.isRequired,
    age: PropTypes.number.isRequired,
    gender: PropTypes.string.isRequired,
    onClick: PropTypes.func.isRequired
}

export default User